﻿#region Version Info
/* ========================================================================
* 【本类功能概述】
* 
* 作者：李荣楠
* 时间：2013-10-18 9:49:27
* 文件名：UiConfig
* .net版本：4.0 
* ========================================================================
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LCL.Config
{
    /// <summary>
    /// 网站配置类
    /// </summary>
    public  class UiConfig
    {
        private static UiConfig ui;
        /// <summary>
        /// 网站名称
        /// </summary>
        public static string WebName = BaseConfig.GetBaseValue("webname");
        /// <summary>
        /// 站点
        /// </summary>
        public static string WebSite = BaseConfig.GetBaseValue("website");
        /// <summary>
        /// 模板名称
        /// </summary>
        public static string Template = BaseConfig.GetBaseValue("template");
        /// <summary>
        /// 页面后缀名
        /// </summary>
        public static string ExName = BaseConfig.GetBaseValue("exName");
        /// <summary>
        /// 版权
        /// </summary>
        public static string Copyright = BaseConfig.GetBaseValue("copyright");
        /// <summary>
        /// 关键字
        /// </summary>
        public static string Keywords = BaseConfig.GetBaseValue("keywords");
        /// <summary>
        /// 是否写入错误日志
        /// </summary>
        public static string IsWriteLog = BaseConfig.GetBaseValue("isWriteLog");
        /// <summary>
        /// 会员cookie标记
        /// </summary>
        public static string UsersCookiesFlag = BaseConfig.GetBaseValue("UsersCookiesFlag");
        /// <summary>
        /// 模板文件所在文件夹
        /// </summary>
        public static string TemplateFolderName = "Template";
        /// <summary>
        /// 管理员cookie标记
        /// </summary>
        public static string AdminCookiesFlag = BaseConfig.GetBaseValue("AdminCookiesFlag");
        /// <summary>
        /// 不登陆是否允许访问站点，0为不允许，1为允许
        /// </summary>
        public static string IsLogin = BaseConfig.GetBaseValue("isLogin");
        /// <summary>
        /// 加密验证码
        /// </summary>
        public static string CookieVerifyCode = BaseConfig.GetBaseValue("CookieVerifyCode");
        /// <summary>
        /// 数据库所用类库名
        /// </summary>
        public static string Dbtype = BaseConfig.GetDBValue("Dbtype");
        /// <summary>
        /// 链接字符串
        /// </summary>
        public static string DBConnectString = BaseConfig.GetDBValue("GetDBValue");
        /// <summary>
        /// cookie域
        /// </summary>
        public static string CookieDomain = BaseConfig.GetDBValue("CookieDomain");
        /// <summary>
        /// 构造函数
        /// </summary>
        public UiConfig()
        {
            WebName = BaseConfig.GetBaseValue("webname");
            WebSite = BaseConfig.GetBaseValue("website");
            Template = BaseConfig.GetBaseValue("template");
            ExName = BaseConfig.GetBaseValue("exName");
            Copyright = BaseConfig.GetBaseValue("copyright");
            Keywords = BaseConfig.GetBaseValue("keywords");
            IsWriteLog = BaseConfig.GetBaseValue("isWriteLog");
            UsersCookiesFlag = BaseConfig.GetBaseValue("UsersCookiesFlag");
            TemplateFolderName = "Template";
            AdminCookiesFlag = BaseConfig.GetBaseValue("AdminCookiesFlag");
            IsLogin = BaseConfig.GetBaseValue("isLogin");
            CookieVerifyCode = BaseConfig.GetBaseValue("CookieVerifyCode");
            Dbtype = BaseConfig.GetDBValue("Dbtype");
            DBConnectString = BaseConfig.GetDBValue("GetDBValue");
        }

        //刷新UiConfig
        public static void Refresh()
        {
            ui = new UiConfig();
        }
    }
}
